#pragma once
#include "DXAMLCommon.h"
#include "XamlSchemaContext.h"
#include "XamlAssemblyToken.h"

#include "XamlSchemaContext.h"
#include "XamlAssemblyToken.h"


class XamlAssembly
{

private: 
	XamlAssembly(const xshared_ptr<XamlSchemaContext> & inSchemaContext, const xshared_ptr<CXString> & inAssemblyName, struct XamlAssemblyToken inXamlAssemblyToken);
public: 
	static HRESULT Create(const xshared_ptr<XamlSchemaContext> & inSchemaContext, const xshared_ptr<CXString> & inAssemblyName, struct XamlAssemblyToken inXamlAssemblyToken, xshared_ptr<XamlAssembly> & outXamlAssembly);
	HRESULT GetTypeNamespace_ForBinaryXaml(const xshared_ptr<XamlAssembly> & spAssembly, const xshared_ptr<CXString> & inTypeNamespace, xshared_ptr<XamlTypeNamespace> & outXamlTypeNamespace);
	enum XamlTypeInfoProviderKind GetTypeInfoProviderKind();
	HRESULT AddXmlNsMapping(const xshared_ptr<CXString> &, const xshared_ptr<CXString> &);
	HRESULT get_Name(xshared_ptr<CXString> & outName);
	const struct XamlAssemblyToken & get_AssemblyToken() const;
private: 
	HRESULT GetSchemaContext(xshared_ptr<XamlSchemaContext> & outSchemaContext);
	xshared_ptr<CXString> m_spAssemblyName;
	struct XamlAssemblyToken m_XamlAssemblyToken;
	xweak_ptr<XamlSchemaContext> m_spSchemaContext;
	xshared_ptr<xstringmap<xshared_ptr<xvector<xshared_ptr<CXString> > > > > m_spNsToTypeNsMap;
};

